package com.pospi.xstore.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.pospi.xstore.R;
import com.pospi.xstore.ui.caigou.InventorySearchActivity;
import com.pospi.xstore.ui.report.GoodsReportActivity;
import com.pospi.xstore.ui.report.KhReportActivity;
import com.pospi.xstore.ui.report.SaleCateReportActivity;
import com.pospi.xstore.ui.report.StoreReportActivity;
import com.pospi.xstore.ui.report.YWReportActivity;
import com.pospi.xstore.ui.static_ui.CashierStaticActivity;
import com.pospi.xstore.ui.static_ui.OrderFindActivity;
import com.pospi.xstore.ui.static_ui.PayWayStaticActivity;
import com.pospi.xstore.ui.static_ui.SaleRankingActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class StatisticsFragment extends BaseFragment {

    @Bind(R.id.staff_sale)
    LinearLayout staffSale;
    @Bind(R.id.product_sale)
    LinearLayout productSale;
    @Bind(R.id.counter_sale)
    LinearLayout counterSale;
    @Bind(R.id.order_find)
    LinearLayout orderFind;
    @Bind(R.id.ll_khwl)
    LinearLayout ll_khwl;
    @Bind(R.id.ll_ywywl)
    LinearLayout ll_ywywl;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_statistics, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.staff_sale, R.id.product_sale, R.id.counter_sale, R.id.order_find,R.id.ll_khwl,R.id.ll_ywywl})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.staff_sale:
                startActivity(InventorySearchActivity.class);
                break;
            case R.id.product_sale:
                startActivity(StoreReportActivity.class);
                break;
            case R.id.counter_sale:
                startActivity(GoodsReportActivity.class);
                break;
            case R.id.order_find:
                startActivity(SaleCateReportActivity.class);
                break;
            case R.id.ll_khwl:
                startActivity(KhReportActivity.class);
                break;
            case R.id.ll_ywywl:
                startActivity(YWReportActivity.class);
                break;
        }
    }
}
